package com.tencent.sr.iris.activity.interfaces.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 *
 */
@AllArgsConstructor
@Getter
public enum ShownTaskStatusEnum {
    /**
     * 进行中
     */
    PROGRESS((byte) 0, "进行中"),
    FINISHED((byte) 1, "已完成"),
    UNFINISHED((byte) 2, "未完成"),
    AUDITING((byte) 3, "审核中"),
    NOT_START((byte) 4, "未开始"),
    ;

    private final byte code;
    private final String desc;

    public static ShownTaskStatusEnum getByCode(byte code) {
        for (ShownTaskStatusEnum staff : ShownTaskStatusEnum.values()) {
            if (staff.getCode() == code) {
                return staff;
            }
        }
        return null;
    }
}
